package com.wuyou.demo;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * IteratorDemo
 *
 * @Date 2024/10/9 13:44
 * @Author 无忧
 */
public class IteratorDemo {

    public static void main(String[] args) {
        List<String> s = new ArrayList<>();
        Iterator<String> iterator = s.iterator();
        while (iterator.hasNext()){
            String next = iterator.next();
            System.out.println(next);
        }
    }
}
